package com.kantboot.functional.im.controller;

import com.kantboot.functional.im.dto.FunctionalImPushMessageDTO;
import com.kantboot.functional.im.service.IFunctionalImPushMessageService;
import com.kantboot.util.common.result.RestResult;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/functional-im/pushMessage")
public class FunctionalImPushMessageController {

    @Resource
    private IFunctionalImPushMessageService service;

    /**
     * 发送消息
     */
    @RequestMapping("/push")
    public RestResult<Void> push(@RequestBody FunctionalImPushMessageDTO message){
        service.push(message);
        return RestResult.success(null,"pushSuccess","发送成功");
    }

}
